package cn.itsource.hrm.Client;

import cn.itsource.hrm.doc.CourseDoc;
import cn.itsource.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author chenyuqi
 * @version v1.0.0
 * @date 2020/5/25
 */
@FeignClient(value = "ES-SERVICE",path = "/course")
public interface CourseClient {

    /**
     * 保存
     * @param courseDoc
     * @return
     */
    @PostMapping("/save")
    AjaxResult save(@RequestBody CourseDoc courseDoc);
    /**
     * 批量保存
     * @param courseDocs
     * @return
     */
    @PostMapping("/saveAll")
    AjaxResult saveAll(@RequestBody List<CourseDoc> courseDocs);
    /**
     * 删除
     * @param id
     * @return
     */
    @PostMapping("/detele")
    AjaxResult detele(@RequestParam("id") Long id);
    /**
     * 删除
     * @param ids
     * @return
     */
    @PostMapping("/deteleAll")
    AjaxResult deteleAll(@RequestBody List<Long> ids);
}
